<?php

$str = "ps -A | grep -i asterisk";
$running = system($str);
if($running == "") {
		system("/etc/init.d/asterisk start");
}

$ast = 'asterisk -rx "module show" | grep -i mysql';
$result =  system($ast);
if($result == "") {
	print("Asterisk MySQL backend not configured!!");
} else {
	print("Asterisk MySQL backend configured properly!!");
}

?>

